﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using TA.DotNetUtils;

namespace TA.Turbo.Controls
{
	/// <summary>
	/// Base class for page group buttons.
	/// </summary>
	public abstract class BaseRepeaterPageButtonGroup : BaseRepeaterPageButton
	{
		/// <summary>
		/// Ctor.
		/// </summary>
		/// <param name="repeater"></param>
		public BaseRepeaterPageButtonGroup(Repeater repeater)
			: base(repeater)
		{

		}
		/// <summary>
		/// Adds visibility:hidden style if this is selected.
		/// </summary>
		/// <param name="writer"></param>
		protected override void AddAttributesToRender(HtmlTextWriter writer)
		{
			base.AddAttributesToRender(writer);

			if (this.Selected)
				writer.AddStyleAttribute(HtmlTextWriterStyle.Visibility, "hidden");
		}
	}
}